/*
 * File Name: AboutAction.java
 */

package co.edu.uniandes.intercon.client.action;

import java.util.Map;

import javax.swing.JFrame;

import co.edu.uniandes.intercon.client.gui.common.window.AboutWindow;

/**
 * Action used to show the about window
 * 
 * @author Fabian Gutierrez [fagossa@gmail.com]
 */
public class AboutAction extends AbstractBaseGUIAction {
    
    private AboutWindow aboutWindow;
    
    /**
     * @see AbstractBaseGUIAction#execute(Map)
     */
    public Object execute(Map params) throws RuntimeException {
        JFrame window = (JFrame) params.get("window");
        if (aboutWindow==null) {
            aboutWindow = new AboutWindow(window);
        }
        aboutWindow.setVisible(true);
        return null;
    }
    
}
